package com.ctshk.rpc.starvip.factory.member;

import com.ctshk.rpc.starvip.dto.start_vip.SiebelMessage;
import com.ctshk.rpc.starvip.dto.start_vip.member.CtsMemberExpirationPoint;
import com.ctshk.rpc.starvip.dto.start_vip.member.ListOfMemberExprPointsItem;
import com.ctshk.rpc.starvip.dto.start_vip.member.MemberExpiredPointsQueryDTO;
import com.ctshk.rpc.starvip.factory.StarVipReqProvider;
import com.ctshk.rpc.starvip.req.member.MemberExpiredPointsQueryReq;
import com.google.common.collect.Lists;

/**
 * @BelongsProject: ctshk-cloud
 * @BelongsPackage: com.ctshk.rpc.starvip.factory.member
 * @Author: hef
 * @CreateTime: 2021-04-12 20:38
 * @Description: 描述
 */
public class MemberExpiredPointsQueryFactory extends StarVipReqProvider<MemberExpiredPointsQueryReq> {
    public MemberExpiredPointsQueryFactory(MemberExpiredPointsQueryReq memberExpiredPointsQueryReq) {
        super(memberExpiredPointsQueryReq);
    }

    @Override
    public SiebelMessage produce() {
        MemberExpiredPointsQueryDTO memberExpiredPointsQueryDTO = new MemberExpiredPointsQueryDTO();
        memberExpiredPointsQueryDTO.setMessageId("String");
        memberExpiredPointsQueryDTO.setIntObjectName("CTS Member Expiration Point");
        memberExpiredPointsQueryDTO.setInterfaceId("CTS_IF_25");
        memberExpiredPointsQueryDTO.setOperation("Query");
        memberExpiredPointsQueryDTO.setMessageType("Integration Object");
        memberExpiredPointsQueryDTO.setIntObjectFormat("String");
        memberExpiredPointsQueryDTO.setListOfMemberExprPointsItem(
                new ListOfMemberExprPointsItem(Lists.newArrayList(
                        new CtsMemberExpirationPoint()
                                .setMemberId(req.getMemberId())
                                .setStartDate(req.getStartDate())
                                .setEndDate(req.getEndDate())
                ))
        );
        return memberExpiredPointsQueryDTO;
    }
}
